package com.zzwc;

import com.zzwc.vote.config.EnvironmentConfig;
import com.zzwc.vote.listen.ApplicationReadyEventListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

@SpringBootApplication
@ImportResource(value = "classpath:spring/spring-bean.xml")
public class Application {

    public static void main(String[] args) {
        System.out.println("***************************************************************");
        System.out.println("启动zzwc-vote...");

        SpringApplication app = new SpringApplication(Application.class);
        app.setAdditionalProfiles(EnvironmentConfig.getActiveProfile());
        app.addListeners(new ApplicationReadyEventListener());
        app.run(args);
    }

}